home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- CStaticString.h
-
- Subclass of CPane that draws a Pascal string. Has less
- overhead than CStaticText since it doesn't require a TEHandle. On
- the other hand, it doesn't do word wrap or justification. Basically
- good for simple labels.
-
- by Dan Podwall - you may do anything you please with this code except
- charge for it, with the exception of normal network download charges.
-
- ******************************************************************************/
-
- #define _H_CStaticString
-
- #include "CPane.h"
- #include "defs.h"
-
- struct CStaticString : CPane {
-
- /* instance variables */
-
- Str255 itsString;
- FontInfo theFontInfo;
- Boolean eraseBehind;
- Boolean useWinFont;
- Int16 itsStyle;
-
- /* public methods */
-
- virtual void IStaticString(CView *anEnclosure, CBureaucrat *aSupervisor,
- Int16 aWidth, Int16 aHeight, Int16 aHEncl, Int16 aVEncl,
- SizingOption aHSizing, SizingOption aVSizing, StringPtr initString);
- virtual void IViewTemp(CView *anEnclosure, CBureaucrat *aSupervisor,
- Ptr viewData);
- virtual void IStaticStringX(void);
- virtual void Draw(Rect *area);
- virtual void SetStaticString( StringPtr theString);
- virtual void GetStaticString( StringPtr theString);
- virtual void SetIndString( Int16 resID, Int16 index);
- virtual void SetFontNum( Int16 theFontNum);
- virtual void SetFontName( StringPtr theFontName);
- virtual void SetTextSize( Int16 theSize);
- virtual void SetTextStyle( Int16 theStyle);
- virtual void SetTextMode( Int16 theMode);
- virtual void SetEraseBehind( Int16 doIt);
-
- /* private methods */
- virtual void CalcFontInfo( void);
- virtual void AdjustSize( void);
- };
-
- typedef struct tStaticStringTemp
- {
- PaneTemp theViewTemp;
- Int16 eraseBehind;
- Int16 useWinFont;
- Int16 fontStyle;
- Int16 theStrID;
- } tStaticStringTemp;